home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: cs.vu.nl!jalten
- From: jalten@cs.vu.nl (Alten JP)
- Subject: Re: BC++ 4.5 OWL
- Nntp-Posting-Host: kits.cs.vu.nl
- References: <310D18B1.40A2@setsk0.rpi.ses.alcatel.es>
- Sender: news@cs.vu.nl
- Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
- Date: Tue, 30 Jan 1996 10:01:58 GMT
- X-Newsreader: TIN [version 1.2 PL2]
- Message-ID: <DLznvB.Aqy.0.-s@cs.vu.nl>
-
- heras (heras@setsk0.rpi.ses.alcatel.es) wrote:
- : I'm just starting to work with BC++ 4.5 OWL, and I've found impossible
- : to enable and disable menu options by mean of EnableMenuItem function.
- : Instead, it seems to work associating these options to particular
- : functions included in response tables for active or inactive windows.
-
- : Is it possible to enable or disable menu options although their handling
- : functions will be associated to windows currently active?
-
- Have you tried fiddling around with the EV_COMMAND_ENABLE
- lines in the response table?
- like:
-
- ... start of response tabel...
- EV_COMMAND_ENABLE(CM_INFO, CeSomeEnable),
- EV_COMMAND_ENABLE(CM_DELETE, CeSomeEnable),
- END_RESPONSE_TABLE;
-
-
- TMyWindow::CeSomeEnable(TCommandEnabler& ce)
- {
- switch (ce.Id)
- {
- case CM_DELETE :
- ce.Enable( !restrictions )
- break;
- case CM_INFO :
- ce.SetCheck(state==info);
- ce.Enable(nrofitems>0)
- break;
- }
- }
-
- Just a thought, don't hit me if you've already tried this,
- just mail me more details....
-
- Jelle Paul
-
- --
- +-------------------------------------------------------+
- | Jelle Paul Alten | jalten@cs.vu.nl |
- | Vrije Universiteit Amsterdam | |
- +-------------------------------------------------------+
-